View Javadoc

1   /*
2    * This file is part of Domingo
3    * an Open Source Java-API to Lotus Notes/Domino
4    * hosted at http://domingo.sourceforge.net
5    *
6    * Copyright (c) 2003-2006 Beck et al. projects GmbH München (http://www.bea.de)
7    *
8    * This library is free software; you can redistribute it and/or
9    * modify it under the terms of the GNU Lesser General Public
10   * License as published by the Free Software Foundation; either
11   * version 2.1 of the License, or (at your option) any later version.
12   *
13   * This library is distributed in the hope that it will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16   * Lesser General Public License for more details.
17   *
18   * You should have received a copy of the GNU Lesser General Public
19   * License along with this library; if not, write to the Free Software
20   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21   */
22  
23  package de.bea.domingo.connector;
24  
25  import javax.resource.ResourceException;
26  import javax.resource.spi.ActivationSpec;
27  import javax.resource.spi.BootstrapContext;
28  import javax.resource.spi.ResourceAdapter;
29  import javax.resource.spi.ResourceAdapterInternalException;
30  import javax.resource.spi.endpoint.MessageEndpointFactory;
31  import javax.transaction.xa.XAResource;
32  
33  /***
34   * @author <a href=mailto:kurt.riede@bea.de>Kurt Riede</a>
35   */
36  public final class DummyResourceAdapter implements ResourceAdapter {
37  
38      /***
39       * Constructor.
40       */
41      public DummyResourceAdapter() {
42      }
43  
44      /***
45       * {@inheritDoc}
46       *
47       * @see javax.resource.spi.ResourceAdapter#start(javax.resource.spi.BootstrapContext)
48       */
49      public void start(final BootstrapContext bootstrapContext) throws ResourceAdapterInternalException {
50      }
51  
52      /***
53       * @see javax.resource.spi.ResourceAdapter#stop()
54       */
55      public void stop() {
56      }
57  
58      /***
59       * This method always returns <code>null</code> to indicate that the message inflow contract not supported.
60       *
61       * {@inheritDoc}
62       *
63       * @see javax.resource.spi.ResourceAdapter#getXAResources(javax.resource.spi.ActivationSpec[])
64       */
65      public XAResource[] getXAResources(final ActivationSpec[] arg0) throws ResourceException {
66          return null;
67      }
68  
69      /***
70       * This method simply does nothing since endpoint activation is not supported.
71       *
72       * {@inheritDoc}
73       *
74       * @see javax.resource.spi.ResourceAdapter#endpointActivation(javax.resource.spi.endpoint.MessageEndpointFactory,
75       *      javax.resource.spi.ActivationSpec)
76       */
77      public void endpointActivation(final MessageEndpointFactory arg0, final ActivationSpec arg1) throws ResourceException {
78          // nothing to do since the message inflow contract is not supported
79      }
80  
81      /***
82       * This method simply does nothing since endpoint activation is not supported.
83       *
84       * {@inheritDoc}
85       *
86       * @see javax.resource.spi.ResourceAdapter#endpointDeactivation(javax.resource.spi.endpoint.MessageEndpointFactory,
87       *      javax.resource.spi.ActivationSpec)
88       */
89      public void endpointDeactivation(final MessageEndpointFactory arg0, final ActivationSpec arg1) {
90          // nothing to do since the message inflow contract is not supported
91      }
92  }